package top.continew.ai.util.parse;

import lombok.extern.slf4j.Slf4j;
import org.springframework.ai.document.Document;
import org.springframework.ai.reader.JsonReader;
import org.springframework.core.io.Resource;

import java.util.List;

/**
 * JsonParse:
 *
 * @Author： Lonni
 * @Date： 2025/8/21  15:39
 */
@Slf4j
public class JsonParse  implements BaseParse{
    /**
     * 解析并切分文件
     *
     * @param filePath
     * @param fileName
     * @return
     */
    @Override
    public List<Document> renderDocment(String filePath, String fileName) {
        Resource resource = new org.springframework.core.io.FileSystemResource(filePath);
        JsonReader jsonReader = new JsonReader(resource);

        List<Document> documents = jsonReader.get();

        return List.of();
    }
}
